home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / lightwave / utilities / par251 / rexx / blockchange.ddr < prev    next >
Text File  |  1994-08-16  |  1KB  |  68 lines

  1. /* Export an anim and import it back.  Uses currently selected file
  2.    Intended for new block limit.
  3.  
  4.    Click on Done when it says "Transfering", to stop.
  5. */
  6.  
  7. Signal on Halt
  8.  
  9. Address DDR
  10.  
  11. if (~show('L','rexxsupport.library')) then
  12.     if ~addlib('rexxsupport.library',0,-30,0) then do
  13.         req 'rexxsupport.library fialed to open.'
  14.         exit
  15.     end
  16.  
  17. call ReadPrefs
  18. Translate ON    /* turn on file translation */
  19. Exporter YUV    /* file emulation is YUV */
  20.  
  21. Mode ANIM    /* Import as anim    */
  22. Filter OFF    /* no filter        */
  23.  
  24. Options Results
  25.  
  26. Req 'Resize the selected anim?'
  27. if result~=1 then exit
  28.  
  29. /* Figure out full path of currently selected anim */
  30. File FULL
  31. fname=result
  32.  
  33. /* Do it */
  34.  
  35. Frames
  36. fr=result
  37. i=1
  38. n=1
  39. out=1
  40. do while exists(fname'.'n)
  41.     address command 'copy' fname'.'n fname'_new.'n
  42.     n=n+1
  43. end
  44. Done name'_new'
  45. call RestorePrefs
  46. exit
  47.  
  48. /* get misc prefs and restore them at exit */
  49.  
  50. ReadPrefs:
  51.     Mode
  52.     r_Mode=result
  53.     Filter
  54.     r_filter=result
  55.     Translate
  56.     r_Translate=result
  57.     Exporter
  58.     r_Exporter=result
  59.     return
  60.  
  61. Halt:
  62. RestorePrefs:
  63.     Mode r_Mode
  64.     Filter r_filter
  65.     Translate r_Translate
  66.     Exporter r_Exporter
  67.     return
  68.